package com.guigu.guliauth.feign;

import com.guigu.gulicommon.entity.pojo.res.Res;
import com.guigu.gulicommon.entity.vo.UserInformationByGiteeVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 第三方服务登陆相关远程调用客户端
 * @author 陈俊杰
 */
@FeignClient(name = "third-party-server", path = "/third/login")
public interface ThirdPartLoginServer {
    /**
     * 通过Gitee授权码获取用户信息
     *
     * @param code 授权码
     * @return 用户信息
     */
    @GetMapping("/gitee/{code}")
    Res<UserInformationByGiteeVo> parseLoginSingerByGitee(@PathVariable("code") String code);
}
